import Cookies from 'js-cookie';
import { rsaDecrypt, rsaEncrypt } from '@/utils/commonutils3';

const TokenKey = 'Company_TOKEN_KEY';
const SId = 'Company_TOKEN_SID';

export function getToken() {
	return rsaDecrypt(Cookies.get(TokenKey));
}

export function setToken(token) {
	return Cookies.set(TokenKey, rsaEncrypt(token));
}

export function removeToken() {
	return Cookies.remove(TokenKey);
}
export function getSid() {
	return rsaDecrypt(Cookies.get(SId));
}

export function setSid(sid) {
	return Cookies.set(SId, rsaEncrypt(sid));
}
